Better Defunctionalization through Lambda Set Specialization
نویسندگان
چکیده
Higher-order functions pose a challenge for both static program analyses and optimizing compilers. To simplify the analysis compilation of languages with higher-order functions, rich body prior work has proposed variety defunctionalization techniques, which can eliminate from by transforming to semantically-equivalent first-order representation. Several modern take this step further, specializing respect on they operate, in turn allowing compilers generate more efficient code. However, existing techniques restrict how function values may be used, forcing implementations fall back costly dynamic alternatives. We propose lambda set specialization (LSS), first technique imposes no restrictions used. formulate LSS terms polymorphic type system tracks flow through program, use recast their arguments as form monomorphization. show that our admits simple tractable inference algorithm, give formalization fully-mechanized proof Isabelle/HOL assistant showing soundness completeness algorithm system. benefits LSS, we evaluate its impact run time performance code generated MLton compiler Standard ML, OCaml compiler, new Morphic functional programming language. find pre-processing achieves speedups up 6.85x under MLton, 3.45x OCaml, 78.93x Morphic.
منابع مشابه
Modular polymorphic defunctionalization
Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation for a functional programming language with parametric polymorphism. Our technique allows modules in a Haskell-like language to be separately defunctionalized and com...
متن کاملA lambda calculus of objects and method specialization
This paper presents an untyped lambda calculus, extended with object primitives that reflect the capabilities of so-called delegation-based object-oriented languages. A type inference system allows static detection of errors, such as message not understood, while at the same time allowing the type of an inherited method to be specialized to the type of the inheriting object. Type soundness is p...
متن کاملImmunix: Survivability Through Specialization
In large-scale systems such as the Internet, the means to exploit security aws can be readily distributed, exposing a large number of systems to vulnerability. This problem is aggravated if system implementations are both xed and widely distributed. For instance, the fact that sendmail 8.7.5 has a particular vulnerability 1] can be used by numerous intruders to attack many systems. These attack...
متن کاملGrammar Specialization through Entropy Thresholds
Explanation-based generalization is used to extract a specialized grammar from the original one using a training corpus of parse trees. This allows very much faster parsing and gives a lower error rate, at the price of a small loss in coverage. Previously, it has been necessary to specify the tree-cutting criteria (or operationality criteria) manually; here they are derived automatically from t...
متن کاملWhich Sensor Set Is Better
Each Space Shuttle mission produces more than 25,000 real-time measurements in NASA's mission control center. Within the mission control center, dozens of computer programs analyze these measurements and present results to mission control personnel. Because these programs support the practice of human-in-the-loop control, they serve primarily to present information to mission controllers. The c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on programming languages
سال: 2023
ISSN: ['2475-1421']
DOI: https://doi.org/10.1145/3591260